/**
 * <copyright>
 * </copyright>
 *
 * $Id: EMetaModelFactoryImpl.java,v 1.1 2008/03/31 03:50:43 zhubin Exp $
 */
package edu.pku.sei.modeler.model.core;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class EMetaModelFactoryImpl extends EFactoryImpl implements EMetaModelFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static EMetaModelFactory init() {
		try {
			EMetaModelFactory theEMetaModelFactory = (EMetaModelFactory)EPackage.Registry.INSTANCE.getEFactory("http:///edu/pku/sei/modeler/ocl/MetaModel.ecore"); 
			if (theEMetaModelFactory != null) {
				return theEMetaModelFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new EMetaModelFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EMetaModelFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case EMetaModelPackage.EMETA_MODEL_ELEMENT: return createEMetaModelElement();
			case EMetaModelPackage.EMETA_COMMENT: return createEMetaComment();
			case EMetaModelPackage.EMETA_NAMED_ELEMENT: return createEMetaNamedElement();
			case EMetaModelPackage.EMETA_GENERALIZATION: return createEMetaGeneralization();
			case EMetaModelPackage.EMETA_PACKAGE: return createEMetaPackage();
			case EMetaModelPackage.EMETA_TYPED_ELEMENT: return createEMetaTypedElement();
			case EMetaModelPackage.EMETA_CLASSIFIER: return createEMetaClassifier();
			case EMetaModelPackage.EMETA_MODEL: return createEMetaModel();
			case EMetaModelPackage.EMETA_ENUM_LITERAL: return createEMetaEnumLiteral();
			case EMetaModelPackage.EMETA_CLASS: return createEMetaClass();
			case EMetaModelPackage.EMETA_DATA_TYPE: return createEMetaDataType();
			case EMetaModelPackage.EMETA_PRIMITIVE_TYPE: return createEMetaPrimitiveType();
			case EMetaModelPackage.EMETA_ENUM: return createEMetaEnum();
			case EMetaModelPackage.EMETA_UNLIMITED_NATURAL: return createEMetaUnlimitedNatural();
			case EMetaModelPackage.EMETA_PARAMETER: return createEMetaParameter();
			case EMetaModelPackage.EMETA_STRUCTURAL_FEATURE: return createEMetaStructuralFeature();
			case EMetaModelPackage.EMETA_OPERATION: return createEMetaOperation();
			case EMetaModelPackage.EMETA_REFERENCE: return createEMetaReference();
			case EMetaModelPackage.EMETA_ATTRIBUTE: return createEMetaAttribute();
			case EMetaModelPackage.EMETA_RELATIONSHIP: return createEMetaRelationship();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaModelElement createEMetaModelElement() {
		MetaModelElement eMetaModelElement = new MetaModelElement();
		return eMetaModelElement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaComment createEMetaComment() {
		MetaComment eMetaComment = new MetaComment();
		return eMetaComment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaNamedElement createEMetaNamedElement() {
		MetaNamedElement eMetaNamedElement = new MetaNamedElement();
		return eMetaNamedElement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaPackage createEMetaPackage() {
		MetaPackage eMetaPackage = new MetaPackage();
		return eMetaPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaTypedElement createEMetaTypedElement() {
		MetaTypedElement eMetaTypedElement = new MetaTypedElement();
		return eMetaTypedElement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaClassifier createEMetaClassifier() {
		MetaClassifier eMetaClassifier = new MetaClassifier();
		return eMetaClassifier;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaModel createEMetaModel() {
		MetaModel eMetaModel = new MetaModel();
		return eMetaModel;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaGeneralization createEMetaGeneralization() {
		MetaGeneralization eMetaGeneralization = new MetaGeneralization();
		return eMetaGeneralization;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaEnumLiteral createEMetaEnumLiteral() {
		MetaEnumLiteral eMetaEnumLiteral = new MetaEnumLiteral();
		return eMetaEnumLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaClass createEMetaClass() {
		MetaClass eMetaClass = new MetaClass();
		return eMetaClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaDataType createEMetaDataType() {
		MetaDataType eMetaDataType = new MetaDataType();
		return eMetaDataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaPrimitiveType createEMetaPrimitiveType() {
		MetaPrimitiveType eMetaPrimitiveType = new MetaPrimitiveType();
		return eMetaPrimitiveType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaEnum createEMetaEnum() {
		MetaEnum eMetaEnum = new MetaEnum();
		return eMetaEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaUnlimitedNatural createEMetaUnlimitedNatural() {
		MetaUnlimitedNatural eMetaUnlimitedNatural = new MetaUnlimitedNatural();
		return eMetaUnlimitedNatural;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaParameter createEMetaParameter() {
		MetaParameter eMetaParameter = new MetaParameter();
		return eMetaParameter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaStructuralFeature createEMetaStructuralFeature() {
		MetaStructuralFeature eMetaStructuralFeature = new MetaStructuralFeature();
		return eMetaStructuralFeature;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaOperation createEMetaOperation() {
		MetaOperation eMetaOperation = new MetaOperation();
		return eMetaOperation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaReference createEMetaReference() {
		MetaReference eMetaReference = new MetaReference();
		return eMetaReference;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaAttribute createEMetaAttribute() {
		MetaAttribute eMetaAttribute = new MetaAttribute();
		return eMetaAttribute;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MetaRelationship createEMetaRelationship() {
		MetaRelationship eMetaRelationship = new MetaRelationship();
		return eMetaRelationship;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EMetaModelPackage getEMetaModelPackage() {
		return (EMetaModelPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static EMetaModelPackage getPackage() {
		return EMetaModelPackage.eINSTANCE;
	}

} //EMetaModelFactoryImpl
